package com.caijinbang.study.base;

import org.springframework.data.domain.Sort;

import java.io.Serializable;

/**
 * @author caijb
 * @version 1.0.0
 * @date 2018-04-25 19:56
 */
public class BaseEntity implements Serializable {


    /**
     * 分页页码,默认页码为1
     */
    private int page = 1;

    /**
     * 分页每页数量,默认20条
     */
    private int size;

    /**
     * 排序列名称,默认id排序
     */
    private String sortName = "id";

    /**
     * 排序方式
     */
    private Sort.Direction sort = Sort.Direction.DESC;

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public String getSortName() {
        return sortName;
    }

    public void setSortName(String sortName) {
        this.sortName = sortName;
    }

    public Sort.Direction getSort() {
        return sort;
    }

    public void setSort(Sort.Direction sort) {
        this.sort = sort;
    }
}
